<template>
  <div class="no-data-container">
    <div class="chart-title">
      <p class="title">{{ title }}</p>
      <p class="sub-title"
        ><span>{{ subTitle }}</span>
        <el-divider v-if="year" direction="vertical" />
        <span v-if="year">{{ year }}年</span>
      </p>
    </div>
    <div class="no-data-img">
      <img src="@/assets/images/bg_nodata.png" />
      <p class="no-data-des">暂无数据</p>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { defineProps } from 'vue';
defineProps(['title', 'subTitle', 'year']);
</script>

<style lang="scss" scoped>
.no-data-container {
  width: 100%;
  height: 100%;
  background: #ffffff;
  box-shadow: 0px 2px 4px 0px rgba(67, 89, 112, 0.08);
  border-radius: 6px;

  .chart-title {
    height: 70px;
    padding: 13px 20px;
    border-bottom: 1px solid #ebeff2;
    .title {
      font-size: 14px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 700;
      color: #0a1f33;
      line-height: 22px;
    }
    .sub-title {
      font-size: 12px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      color: #7a8a99;
      line-height: 20px;
    }
  }

  .no-data-img {
    height: calc(100% - 70px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .no-data-des {
      color: #7a7a99;
    }
  }
}
</style>
